﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _404park.ApplicationServices.SearchProvider
{
    public class YahooSearchProvider : ISearchProvider
    {
        public static readonly string YResultUrl = ConfigurationManager.AppSettings["yahooSearchResultUrl"];

        public YahooSearchProvider() : this(40)
        {
        }

        public YahooSearchProvider(int percentage)
        {
            Percentage = percentage;
        }

        public string BaseUrl
        {
            get { return YResultUrl; }
        }

        public int Percentage { get; set; }

        public string Name { get { return "Yahoo"; } }

        public string BuildNavigateUrl(string keywords)
        {
            return string.Format(BaseUrl, AppGlobal.AppHost, keywords);
        }

        public string GetSearchResults(string keywords)
        {
            throw new NotImplementedException();
        }
    }
}
